<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
	<link rel="stylesheet" href="../css/mui.min.css">
	<link rel="stylesheet" type="text/css" href="../css/youyi.css"/>
	<link rel="stylesheet" type="text/css" href="../css/environmental.css"/>
    <title>环保供求</title>
   <style>
		html,
		body {
			background-color: #efeff4;
		}
		.mui-bar~.mui-content .mui-fullscreen {
			top: 44px;
			height: auto;
		}
		.mui-pull-top-tips {
			position: absolute;
			top: -20px;
			left: 50%;
			margin-left: -25px;
			width: 40px;
			height: 40px;
			border-radius: 100%;
			z-index: 1;
		}
		.mui-bar~.mui-pull-top-tips {
			top: 86px;
		}
		.mui-pull-top-wrapper {
			width: 42px;
			height: 42px;
			display: block;
			text-align: center;
			background-color: #efeff4;
			border: 1px solid #ddd;
			border-radius: 25px;
			background-clip: padding-box;
			box-shadow: 0 4px 10px #bbb;
			overflow: hidden;
		}
		.mui-pull-top-tips.mui-transitioning {
			-webkit-transition-duration: 200ms;
			transition-duration: 200ms;
		}
		.mui-pull-top-tips .mui-pull-loading {
			/*-webkit-backface-visibility: hidden;
			-webkit-transition-duration: 400ms;
			transition-duration: 400ms;*/
			
			margin: 0;
		}
		.mui-pull-top-wrapper .mui-icon,
		.mui-pull-top-wrapper .mui-spinner {
			margin-top: 7px;
		}
		.mui-pull-top-wrapper .mui-icon.mui-reverse {
			/*-webkit-transform: rotate(180deg) translateZ(0);*/
		}
		.mui-pull-bottom-tips {
			text-align: center;
			background-color: #efeff4;
			font-size: 15px;
			line-height: 40px;
			color: #777;
		}
		.mui-pull-top-canvas {
			overflow: hidden;
			background-color: #fafafa;
			border-radius: 40px;
			box-shadow: 0 4px 10px #bbb;
			width: 40px;
			height: 40px;
			margin: 0 auto;
		}
		.mui-pull-top-canvas canvas {
			width: 40px;
		}
		.mui-slider-indicator.mui-segmented-control {
			background-color: #efeff4;
		}
	</style>	
</head>
<body>
	<header class="mui-bar mui-bar-nav top_nav">
		<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left detail_left"></a>
		<h1 id="title" class="mui-title">环保供求</h1>
		<!--<a id="info" class="mui-icon iconfont icon-caidan mui-pull-right"></a>-->
	</header>
	<div class="mui-content">
			<div id="slider" class="mui-slider mui-fullscreen envir_contents">
				<div id="sliderSegmentedControl" class="mui-scroll-wrapper mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
					<div class="mui-scroll">
						<a class="mui-control-item mui-active" href="#item1mobile">
							正在热抢
						</a>
						<a class="mui-control-item" href="#item2mobile">
							环保工程
						</a>
						<a class="mui-control-item" href="#item3mobile">
							环境监测
						</a>
						<a class="mui-control-item" href="#item4mobile">
							清洁生产
						</a>
						<a class="mui-control-item" href="#item5mobile">
							节能改造
						</a>
						<a class="mui-control-item" href="#item6mobile">
							科技创新
						</a>
					</div>
				</div>
				<div class="mui-slider-group">
					<div id="item1mobile" class="mui-slider-item mui-control-content mui-active">
						<div id="scroll1" class="mui-scroll-wrapper">
							<div class="mui-scroll">
								<ul class="mui-table-view">
									<li class="mui-table-view-cell">
										<a href="demand_details.html">
											<div class="list_content_box">
												<h2 class="envir_head clearfix">东莞保力***<span>环境监测</span></h2>
												<div class="envir_contact"><span class="contact_people">联系人：李**</span><span class="contact_phone mui-ellipsis">电话：13800138***</span></div>
												<div class="envir_descript"><p>需求描述：工业酒精0.1砘 擦机水0.5吨 洗板水0.0015吨助焊0.25吨 碎布0.3吨</p></div>
												<div class="talling_d clearfix">
													<span class="green_ico">洽谈中</span>
													<time>2016-07-28</time>
												</div>
											</div>
										</a>
									</li>
									<li class="mui-table-view-cell">
										<a href="demand_details.html">
											<div class="list_content_box">
												<h2 class="envir_head clearfix">东莞保力***<span>环境监测</span></h2>
												<div class="envir_contact"><span class="contact_people">联系人：李**</span><span class="contact_phone mui-ellipsis">电话：13800138***</span></div>
												<div class="envir_descript"><p>需求描述：工业酒精0.1砘 擦机水0.5吨 洗板水0.0015吨助焊0.25吨 碎布0.3吨</p></div>
												<div class="talling_d clearfix">
													<span class="green_ico">洽谈中</span>
													<time>2016-07-28</time>
												</div>
											</div>
										</a>
									</li>
									<li class="mui-table-view-cell">
										<a href="demand_details.html">
											<div class="list_content_box">
												<h2 class="envir_head clearfix">东莞保力***<span>环境监测</span></h2>
												<div class="envir_contact"><span class="contact_people">联系人：李**</span><span class="contact_phone mui-ellipsis">电话：13800138***</span></div>
												<div class="envir_descript"><p>需求描述：工业酒精0.1砘 擦机水0.5吨 洗板水0.0015吨助焊0.25吨 碎布0.3吨</p></div>
												<div class="talling_d clearfix">
													<span class="green_ico">洽谈中</span>
													<time>2016-07-28</time>
												</div>
											</div>
										</a>
									</li>
									<li class="mui-table-view-cell">
										<a href="demand_details.html">
											<div class="list_content_box">
												<h2 class="envir_head clearfix">东莞保力***<span>环境监测</span></h2>
												<div class="envir_contact"><span class="contact_people">联系人：李**</span><span class="contact_phone mui-ellipsis">电话：13800138***</span></div>
												<div class="envir_descript"><p>需求描述：工业酒精0.1砘 擦机水0.5吨 洗板水0.0015吨助焊0.25吨 碎布0.3吨</p></div>
												<div class="talling_d clearfix">
													<span class="green_ico">洽谈中</span>
													<time>2016-07-28</time>
												</div>
											</div>
										</a>
									</li>
									<li class="mui-table-view-cell">
										<a href="demand_details.html">
											<div class="list_content_box">
												<h2 class="envir_head clearfix">东莞保力***<span>环境监测</span></h2>
												<div class="envir_contact"><span class="contact_people">联系人：李**</span><span class="contact_phone mui-ellipsis">电话：13800138***</span></div>
												<div class="envir_descript"><p>需求描述：工业酒精0.1砘 擦机水0.5吨 洗板水0.0015吨助焊0.25吨 碎布0.3吨</p></div>
												<div class="talling_d clearfix">
													<span class="green_ico">洽谈中</span>
													<time>2016-07-28</time>
												</div>
											</div>
										</a>
									</li>
									<li class="mui-table-view-cell">
										<a href="demand_details.html">
											<div class="list_content_box">
												<h2 class="envir_head clearfix">东莞保力***<span>环境监测</span></h2>
												<div class="envir_contact"><span class="contact_people">联系人：李**</span><span class="contact_phone mui-ellipsis">电话：13800138***</span></div>
												<div class="envir_descript"><p>需求描述：工业酒精0.1砘 擦机水0.5吨 洗板水0.0015吨助焊0.25吨 碎布0.3吨</p></div>
												<div class="talling_d clearfix">
													<span class="green_ico">洽谈中</span>
													<time>2016-07-28</time>
												</div>
											</div>
										</a>
									</li>
								</ul>
							</div>
						</div>
					</div>
					<div id="item2mobile" class="mui-slider-item mui-control-content">
						<div class="mui-scroll-wrapper">
							<div class="mui-scroll">
								<ul class="mui-table-view">
									<li class="mui-table-view-cell">
										第2个选项卡子项-1
									</li>									
								</ul>
							</div>
						</div>
					</div>
					<div id="item3mobile" class="mui-slider-item mui-control-content">
						<div class="mui-scroll-wrapper">
							<div class="mui-scroll">
								<ul class="mui-table-view">
									<li class="mui-table-view-cell">
										第3个选项卡子项-1
									</li>
								</ul>
							</div>
						</div>
					</div>
					<div id="item4mobile" class="mui-slider-item mui-control-content">
						<div class="mui-scroll-wrapper">
							<div class="mui-scroll">
								<ul class="mui-table-view">
									<li class="mui-table-view-cell">
										第4个选项卡子项-1
									</li>
								</ul>
							</div>
						</div>
					</div>
					<div id="item5mobile" class="mui-slider-item mui-control-content">
						<div class="mui-scroll-wrapper">
							<div class="mui-scroll">
								<ul class="mui-table-view">
									<li class="mui-table-view-cell">
										第5个选项卡子项-1
									</li>
								</ul>
							</div>
						</div>
					</div>
					<div id="item6mobile" class="mui-slider-item mui-control-content">
						<div class="mui-scroll-wrapper">
							<div class="mui-scroll">
								<ul class="mui-table-view">
									<li class="mui-table-view-cell">
										第6个选项卡子项-1
									</li>
								</ul>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="send_dem"><a href="release_requirements.html" class="send_dem_btn">发布<br />需求</a></div>
		<script src="../js/mui.min.js"></script>
		<script src="../js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="../js/mui.pullToRefresh.js"></script>
		<script src="../js/mui.pullToRefresh.material.js"></script>
		<script>
			mui.init({
				preloadPages:[{
					url:"demand_details.html",
					id:"demand_details.html"
				}]
			});
			(function($) {
				//阻尼系数
				var deceleration = mui.os.ios?0.003:0.0009;
				$('.mui-scroll-wrapper').scroll({
					bounce: false,
					indicators: true, //是否显示滚动条
					
					deceleration:deceleration
				});
				$.ready(function() {
					//循环初始化所有下拉刷新，上拉加载。
					$.each(document.querySelectorAll('.mui-slider-group .mui-scroll'), function(index, pullRefreshEl) {
						$(pullRefreshEl).pullToRefresh({
							down: {
								callback: function() {
									var self = this;
									setTimeout(function() {
										var ul = self.element.querySelector('.mui-table-view');
										ul.insertBefore(createFragment(ul, index, 2, true), ul.firstChild);
										self.endPullDownToRefresh();
									}, 1000);
								}
							},
							up: {
								callback: function() {
									var self = this;
									setTimeout(function() {
										var ul = self.element.querySelector('.mui-table-view');
										ul.appendChild(createFragment(ul, index,3));
										self.endPullUpToRefresh();
									}, 1000);
								}
							}
						});
					});
					var createFragment = function(ul, index, count, reverse) {
						var length = ul.querySelectorAll('li').length;
						var fragment = document.createDocumentFragment();
						var li;
						for (var i = 0; i < count; i++) {
							li = document.createElement('li');
							li.className = 'mui-table-view-cell';
							var liHTML='<a href="demand_details.html">';
								liHTML +='<div class="list_content_box">';
								liHTML +='<h2 class="envir_head clearfix">东莞保力***<span>环境监测</span></h2>';
								liHTML +='<div class="envir_contact">';
								liHTML +='<span class="contact_people">联系人：李**</span>';
								liHTML +='<span class="contact_phone mui-ellipsis">电话：13800138***</span>';
								liHTML +='</div>';
								liHTML +='<div class="envir_descript"><p>' + (index + 1) + '需求描述：工业酒精0.1砘 擦机水0.5吨 洗板水0.0015吨助焊0.25吨 碎布0.3吨</p></div>';
								liHTML +='<div class="talling_d clearfix">';
								liHTML +='<span class="green_ico">洽谈中</span>';
								liHTML +='<time>2016-07-28</time>';
								liHTML +='</div>';
								liHTML +='</div>';
								liHTML +='</a>';
							li.innerHTML = liHTML;
							fragment.appendChild(li);
						};
						return fragment;
					};
				});
				
				
			})(mui);
			
			function readTranforam(){
				var getTranformY=sessionStorage.getItem("oldTranformY");
					getTranformY=JSON.parse(getTranformY);
				if(getTranformY){
					var i=0,nowTransformY=null;
					for(i in getTranformY){
						i=Number(i);
						nowTransformY=Number(getTranformY[i]);
					};
					$(".mui-control-item,.mui-slider-item").eq(i).addClass("mui-active").siblings().removeClass("mui-active");
					mui(".mui-slider-item.mui-active .mui-scroll-wrapper").scroll().scrollTo(0,nowTransformY,1000);
				};
			};
			function recordTranforam(obj){
				var reg=/-\d+/;
				var transform=$(obj).closest(".mui-scroll").css("transform");
				var activeIndex=$(obj).closest(".mui-slider-item").index();
				var oldTranformY={};
					oldTranformY[activeIndex]=transform.match(reg)?transform.match(reg)[0]:0;
					sessionStorage.setItem('oldTranformY',JSON.stringify(oldTranformY));
			};
			window.onload=function(){
				readTranforam();
			};

			mui(".mui-slider-item").on("tap","li a",function(e){
				recordTranforam(this);
				mui.openWindow(this.href);
			});
			
			document.querySelector(".send_dem").style.zIndex=2;			
		</script>
	</body>
</html>